Skip to content

fix: require colon after PR/PR-URL in body lines - #40

Merged
rvagg merged 1 commit into
nodejs:mainfrom
trivikr:colon-after-pr-url
Nov 20, 2026
Merged

rvagg merged 1 commit into
nodejs:mainfrom
trivikr:colon-after-pr-url

Conversation

@trivikr

@trivikr trivikr commented Nov 3, 2026

Copy link
Copy Markdown
Member

Problem

The PR URL regex made both the -URL suffix and the colon optional, so any indented body line starting with PR matched. For example, PRs: tidy up docs gave prUrl: "s: tidy up docs", and when it was the first body line the commit lost its summary.

Fix

Require the colon:

-/^\s+PR(?:[- ]?URL)?:?\s*(.+)\s*$/
+/^\s+PR(?:[- ]?URL)?:\s*(.+)\s*$/

PR-URL:, PR URL:, PRURL: and PR: still parse. Lines with no colon, like PR-URL https://..., no longer do.

@trivikr

trivikr commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

cc @rvagg for review

@rvagg
rvagg merged commit 8dc0a80 into nodejs:main Nov 20, 2026
7 checks passed
github-actions Bot pushed a commit that referenced this pull request Nov 20, 2026
## [3.0.3](v3.0.2...v3.0.3) (2026-11-20)

### Bug Fixes

* require colon after PR/PR-URL in body lines ([#40](#40)) ([8dc0a80](8dc0a80))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 3.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@trivikr
trivikr deleted the colon-after-pr-url branch November 20, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants